package org.front.client.widget;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Hyperlink;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

public class MenuWidget extends Composite {

	private FlowPanel rootPanel;

	public MenuWidget(EventBus eventBus) {
		rootPanel = new FlowPanel();
		rootPanel.add(getMenu());
		rootPanel.setStyleName("menu");
		initWidget(rootPanel);
	}

	public Widget getMenu() {

		Hyperlink link0 = new Hyperlink("link to foo", "foo");
		Hyperlink link1 = new Hyperlink("link to bar", "bar");
		Hyperlink link2 = new Hyperlink("link to baz", "baz");

		// Add a label
		VerticalPanel vPanel = new VerticalPanel();
		vPanel.setSpacing(5);
		// Add a hyper link to each section in the Widgets category
		vPanel.add(link0);
		vPanel.add(link1);
		vPanel.add(link2);

		// Return the panel
		return vPanel;
	}
}
